package models

import "time"

type DevopsUserModel struct {
	DevopsUserId      int       `gorm:"column:devops_user_id;" json:"devops_user_id"`
	DevopsProjectName string    `gorm:"column:devops_project_name" json:"devops_project_name"`
	DevopsUserName    string    `gorm:"column:devops_user_name" json:"devops_user_name"`
	DevopsUserRole    string    `gorm:"column:devops_user_role" json:"devops_user_role"`
	CreateTime        time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP" json:"create_time"`
}

func NewDevopsUserModel(pName, uName, uRole string) *DevopsUserModel {
	return &DevopsUserModel{
		DevopsProjectName: pName,
		DevopsUserName:    uName,
		DevopsUserRole:    uRole,
	}
}

func (d *DevopsUserModel) TableName() string {
	return "devops_user"
}
